<template>
	<!-- 我的处方 -->
	<view class="prescription-main">
		<view class="prescription-filter">
			<uni-segmented-control :current="current" :values="items" active-color="#dd524d" @clickItem="onClickItem" style-type="text" />
		</view>
		<view class="prescriptionList">
			<view class="prescriptionItem" v-for="item in 10" :key="item" @click="gotoPath('/pages/prescriptionInfo/prescriptionInfo')">
				<hwxcPrescriptionItem/>
			</view>
		</view>
		
	</view>
</template>

<script>
	import hwxcPrescriptionItem from '../../components/hwxcPrescriptionItem/hwxcPrescriptionItem.vue'
	export default {
		data() {
			return {
				items: ['待使用', '已使用', '已失效'],
				current: 0
			}
		},
		components:{
			hwxcPrescriptionItem
		},
		methods: {
			gotoPath(path){
				uni.navigateTo({
					url:path
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.prescription-main{
		.prescription-filter{
			background-color: #fff;
			height: 80rpx;
		}
		
		.prescriptionList{
			box-sizing: border-box;
			padding: 20rpx;
			.prescriptionItem{
				background-color: #fff;
				border-radius: 24rpx;
				box-sizing: border-box;
				padding: 30rpx;
				margin-bottom: 20rpx;
			}
		}
	}
</style>
